package com.melesta.payment.inapp;

import com.melesta.payment.interfaces.IRequestBuilder;

public class InAppRequestBuilder
  implements IRequestBuilder
{
  private static final String COUNT_TAG = "countPerItem";
  private static final String NAME_TAG = "name";
  private static final String SKU_TAG = "billingCode";
  private InAppRequest request;

  public InAppRequestBuilder(InAppSystem paramInAppSystem)
  {
    this.request = new InAppRequest(paramInAppSystem);
  }

  public InAppRequest createRequest()
  {
    return new InAppRequest(this.request.getSystem()).setName(this.request.getName()).setSku(this.request.getSku()).setCountPerItem(this.request.getCountPerItem());
  }

  public Object get(String paramString)
  {
    if (paramString.equals("name"))
      return this.request.getName();
    if (paramString.equals("billingCode"))
      return this.request.getSku();
    if (paramString.equals("countPerItem"))
      return Integer.valueOf(this.request.getCountPerItem());
    return null;
  }

  public IRequestBuilder set(String paramString, Object paramObject)
  {
    if (paramString.equals("name"))
      this.request.setName(paramObject.toString());
    do
    {
      return this;
      if (paramString.equals("billingCode"))
      {
        this.request.setSku(paramObject.toString());
        return this;
      }
    }
    while (!paramString.equals("countPerItem"));
    this.request.setCountPerItem(Integer.parseInt(paramObject.toString()));
    return this;
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.melesta.payment.inapp.InAppRequestBuilder
 * JD-Core Version:    0.6.2
 */